package org.jeecg.modules.car.service.impl;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.entity.car.CarModel;
import org.jeecg.modules.car.mapper.CarModelMapper;
import org.jeecg.modules.car.service.ICarModelService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 车场车型表
 * @Author: liurui
 * @Date:   2020-09-30
 * @Version: V1.0
 */
@Service
public class CarModelServiceImpl extends ServiceImpl<CarModelMapper, CarModel> implements ICarModelService {

    @Autowired
    private CarModelMapper carModelMapper;

    @Override
    public List<CarModel> findPage(Page<CarModel> page, CarModel carModel) {
        return carModelMapper.findPage(page,carModel);
    }

    @Override
    public void batchSaveOrUpdate(List<CarModel> carModelList) {
        carModelMapper.batchSaveOrUpdate(carModelList);
    }

    @Override
    public List<CarModel> queryCarModelByParkId(String parkId) {
        return carModelMapper.queryCarModelByParkId(parkId);
    }

    @Override
    public List<CarModel> findByProject(String projectId) {
        return carModelMapper.findByProject(projectId);
    }

    @Override
    public CarModel getByModelId(String modelId) {
        return carModelMapper.getByModelId(modelId);
    }
}
